fix: restrict yaml suffix resolution to externalServiceRegistrations directory @W-20424423@#1790
Open
WillieRuemmele wants to merge 1 commit into
Open
fix: restrict yaml suffix resolution to externalServiceRegistrations directory @W-20424423@#1790WillieRuemmele wants to merge 1 commit into
WillieRuemmele wants to merge 1 commit into
Conversation
…directory @W-20424423@ The decomposeExternalServiceRegistrationBeta preset registered `.yaml` as a global suffix, causing all .yaml files to be inferred as ExternalServiceRegistration regardless of location. The fix adds `strictDirectoryName: true` to the yaml child type and refines the suffix-based resolution guard to only reject types when the file is NOT in the expected directory.
jfeingold35
approved these changes
Jun 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
decomposeExternalServiceRegistrationBetacaused all.yamlfiles to be inferred asExternalServiceRegistration, regardless of their directory locationstrictDirectoryName: trueto theyamlchild type in the ESR presetstrictDirectoryNametypes from suffix matching)Work Item
@W-20424423@: Every *.yml file is now inferred as External Service Registration after enabling metadata decomposition
forcedotcom/cli#3463
Root Cause
The ESR preset registers
yamlin the globalsuffixesmap. During type resolution "attempt 3" (file extension → suffix lookup), any.yamlfile would match. The existing guard (strictDirectoryName === true → reject) couldn't help because the yaml child type didn't have that flag set.Fix
strictDirectoryName: trueon the yaml child typefsPathdoes NOT contain the type'sdirectoryNameProof of Work
Test plan
sf project deploy startwithdecomposeExternalServiceRegistrationBetaenabled and a.yamlfile in a non-ESR directory should not produce ConversionError.yamlfiles inexternalServiceRegistrations/are resolved and deployed correctly